package com.pactera.demo.common.enums;

import lombok.Getter;

/**
 * <p>
 * 自定义响应码枚举
 * </p>
 *
 * @author chang.zhou
 * @version 1.0
 * @date Created in 2020/2/13 15:48
 */
@Getter
public enum StatusCodeEnum {

    OK(2000,"请求成功"),

    ILLEGAL_PARAM(4000, "参数错误"),

    UNAUTHENTICATED_ACTION(4010, "访问当前资源的权限不足"),

    USERNAME_OR_PASSWORD_ERROR(4011,"用户名或密码错误"),

    INSUFFICIENT_AUTHENTICATION(4012,"凭证缺失请登录"),

    RESOURCE_NOT_FOUND(4040,"资源未注册或不存在"),

    INVALID_TOKEN(4020,"授权码(token)无效"),

    AUTHENTICATION_FAILED(4013,"认证失败")


    //...继续添加

    ;

    private int code;
    private String message;

    StatusCodeEnum(int code, String message){
        this.code = code;
        this.message = message;
    }



}
